<div class="header">
    <back-Btn></back-Btn>
    任务详情
    <div class="right-btn" ng-click="newtask.submit()" ng-if="newtask.param.isManager==3">
        提交
    </div>
</div>
<div class="container finance taskdetail">
    <div class="list f_sk">
        <div class="list-item flex icon_menu" ng-click="newtask.showSheet('statusObj')">
            <div class="w40 c9">创建任务至:</div>
            <div class="w60" ng-class="{cd9:!newtask.param.statusContent}">{{newtask.param.statusContent||"必填"}}</div>
        </div>
        <div class="task-item">
            <p>请输入任务名称</p>
            <input type="text" ng-model="newtask.param.title" ng-disabled="newtask.param.isManager!=3" />
        </div>
        <div class="task-item">
            <p>请输入任务详情</p>
            <textarea name="" id="" cols="30" rows="10" ng-model="newtask.param.content" ng-disabled="newtask.param.isManager!=3"></textarea>
        </div>
        <div class="task-item">
            <p>开始时间</p>
            <input type="text" date-directive id="start_date" datetype="datetime" ng-model="newtask.param.startDate" class="c0 icon_clock" ng-disabled="newtask.param.isManager!=3" />
        </div>
        <div class="task-item">
            <p>结束时间</p>
            <input type="text" date-directive id="end_date" datetype="datetime" ng-model="newtask.param.endDate" class="c0 icon_clock" ng-disabled="newtask.param.isManager!=3" />
        </div>
        <div class="task-item">
            <p>负责人</p>
            <div ng-click="newtask.goaddjoinpeople('incharge')" class="text icon_userA">{{newtask.param.userName}}</div>
        </div>
        <div class="task-item">
            <p class="celled">参与人</p>
            <div class="joinpeople-list mt10">
                <div class="joinpeople-item tc" ng-repeat="item in newtask.param.joinPersons" track-by="item.userId">
                    <div class="item-avtar lh50">{{item.userName|username}}</div>
                    <p class="te">{{item.userName}}</p>
                    <p class="icon_del1" ng-click="newtask.deljoinconfirm($index)" ng-if="newtask.param.isManager==3">del</p>
                </div>
                <div ng-click="newtask.goaddjoinpeople('participator1')" class="joinpeople-item tc" ng-if="newtask.param.isManager==3">
                    <div class="icon_addpic"></div>
                </div>
            </div>
        </div>
        <div class="task-item">
            <p>优先级</p>
            <div ng-click="newtask.showSheet('priorityObj')" class="text icon_prive">{{newtask.param.priorityContent}}</div>
        </div>
        <div class="task-item">
            <p>重复</p>
            <div ng-click="newtask.showSheet('repetitionObj')" class="text icon_repeat">{{newtask.param.repetitionContent}}</div>
        </div>
        <div class="task-item">
            <p class="celled">子任务 <span class="c-succ fr" ng-click="newtask.addsubtask()" ng-if="newtask.param.isManager==3">添加子任务</span></p>
            <div class="subtask-list mt10">
                <div class="subtask-item flex" ng-repeat="item in newtask.param.subTasks" track-by="item.userId">
                    <div class="te">{{item.content}}</div>
                    <div class="tr">{{item.userName}} {{item.finishedDate|dateFmt:'MM月dd日'}} <span ng-click="newtask.changetaskStatus(item)" ng-class="{icon_task_check:item.finished,icon_task_uncheck:!item.finished}" ng-if="item.modifyFlag==1||item.modifyFlag==2"></span> <span class="icon_del2" ng-click="newtask.deltaskconfirm($index)" ng-if="item.modifyFlag==2"></span></div>
                </div>
            </div>
        </div>
        <div class="task-item">
            <p>任务开始提醒</p>
            <div ng-click="newtask.showSheet('startNoticeTimeObj')" class="text icon_remind" ng-class="{icon_remindA:newtask.param.startNoticeTimeContent}"><span ng-show="!newtask.param.startNoticeTimeContent" class="c9">请选择提醒时间</span>{{newtask.param.startNoticeTimeContent}}</div>
        </div>
        <div class="task-item">
            <p>任务完成提醒</p>
            <div ng-click="newtask.showSheet('endNoticeTimeObj')" class="text icon_remind" ng-class="{icon_remindA:newtask.param.endNoticeTimeContent}"><span ng-show="!newtask.param.endNoticeTimeContent" class="c9">请选择提醒时间</span>{{newtask.param.endNoticeTimeContent}}</div>
        </div>
        <div class="btn-tip btn c1 mt10" ng-click="newtask.togglePublic()">{{newtask.param.visibilityInPublicContent}}</div>
        <div class="mt10 flex task-tab">
            <div class="commet w50 sub-item" ng-click="newtask.showcommet()" ng-class="{'active':newtask.showcommetlist}">评论</div>
            <div class="log w50 sub-item" ng-click="newtask.showlog()" ng-class="{'active':newtask.showloglist}">操作日志</div>
        </div>
        <div class="commet-wrapper" ng-show="newtask.showcommetlist">
            <div file-upload2 commet-handle="newtask.commethandle"></div>
            <ul class="fb-list list-group lh30">
                <li class="list-group-item celled" ng-repeat="item in newtask.commetList">
                    <div class="fb-header grid">
                        <p class="col-1-4">{{item.userName}}</p>
                        <p class="col-3-4 tr">{{item.createDate}}</p>
                    </div>
                    <div class="fb-content">
                        <span ng-bind-html="item.content"></span>
                    </div>
                    <div class="list-record" ng-show="item.attachment">
                        <div class="record-item">
                            <span class="filename">附件名称</span><span class="c-blue" ng-click="newtask.showfile(item.attachment)">{{item.attachment|fileName}}</span>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
        <div class="log-wrapper" ng-show="newtask.showloglist">
            <ul class="log-list list-group">
                <li class="list-group-item flex fs12 lh30 celled" ng-repeat="item in newtask.loglist">
                    <p class="w15">{{item.userName}}</p>
                    <p class="w50">{{item.content}}</p>
                    <p class="w35">{{item.createDate|dateFmt:"MM-dd hh:mm:ss"}}</p>
                </li>
                <p class="tc" ng-show="!newtask.loglist">没有数据</p>
            </ul>
        </div>
    </div>
</div>
<div class="file-wrapper" ng-show="newtask.src">
    <div class="del-btn icon_del1 lh30" ng-click="newtask.closefile()">del</div><img ng-src="{{newtask.src}}" alt="" width="100%">
</div>
<sheet-action ng-show="newtask.sheetObj.ifshowSheet" sheet-data="newtask.sheetObj"></sheet-action>
